<template>
  <div class="app-container">
    <eHeader :param-bean="paramBean" :sup_this="sup_this" />
    <eForm ref="form" :sup_this="sup_this" />
    <!--表格渲染-->
    <DataGridTable
      v-loading="loading"
      ref="mainTable"
      :sup_this="sup_this"
      :data="data.rtnList"
      :max-height="gridMaxHeight"
      :total="total"
      grid-id="baseOperateLogMngProcessGridId"
      @selection-change="handleGridSelectionChange">
      <DataGridColumnSlot prop="costTime" label="操作">
        <template slot-scope="scope">
          <edit :data="scope.row" :sup_this="sup_this" />
        </template>
      </DataGridColumnSlot>
      <DataGridColumn prop="createBy" label="请求用户" />
      <DataGridColumn prop="requestIp" label="请求IP" />
      <DataGridColumn prop="logInfo" label="日志信息描述" />
      <DataGridColumn prop="costTime" label="花费时间" />
      <DataGridColumn prop="className" label="类名" />
      <DataGridColumn prop="methodName" label="方法名" />
      <DataGridColumn prop="objectCode" label="系统编号" />
      <DataGridColumn prop="busModule" label="业务模块代码" />
      <DataGridColumn prop="logLevel" label="日志级别" />
      <DataGridColumn prop="logType" label="日志类别" />
      <DataGridColumnSlot prop="lastUpdateDate" label="时间" >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.lastUpdateDate) }}</span>
        </template>
      </DataGridColumnSlot>
    </DataGridTable>
  </div>
</template>

<script>
import { parseTime } from '@/utils/index'
import eHeader from './module/baseOperateLogHeader'
import edit from './module/baseOperateLogEdit'
import eForm from './module/baseOperateLogForm'
import initData from '@/mixins/initData'
import baseOperateLog from '@/api/base/BaseOperateLog'

export default {
  components: { eHeader, eForm, edit },
  mixins: [initData],
  props: {
  },
  data() {
    return {
      delLoading: false,
      sup_this: this
    }
  },
  created() {
    this.url = baseOperateLog.loadDataUrl()
    this.$nextTick(() => {
      this.resetQuery(true)
    })
  },
  mounted() {
  },
  methods: {
    parseTime,
    async beforeInit() {
      return true
    }
  }
}
</script>
